package com.example.computer_exam_training_sys.service.impl;

import com.example.computer_exam_training_sys.entity.SysLog;
import com.example.computer_exam_training_sys.mapper.SysLogMapper;
import com.example.computer_exam_training_sys.service.SysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class SysLogServiceImpl implements SysLogService {
    @Autowired
    private SysLogMapper logMapper;

    // SysLogServiceImpl.java
    @Override
    public List<SysLog> searchLogsPaged(String userName, String startDate, int offset, int size) {
        return logMapper.searchLogsPaged(userName, startDate, offset, size);
    }
    @Override
    public int countLogs(String userName, String startDate) {
        return logMapper.countLogs(userName, startDate);
    }

    @Override
    public int insertLog(SysLog log) {
        return logMapper.insertLog(log);
    }
}